<template>
	<view class="container999">
		<refresh :isTop="isTop" ref="refresh" :needVibrate="true" @isRefresh="isRefresh"></refresh>
		<view class="nav">
			<view style="background: #fff;width: 100vw;">
				<view class="statu-space" :style="{ height: statusBarHeight + 'px' }"></view>
			</view>
			<view class="navTopBox">小剧场</view>
		</view>
		<darenChoose v-if="darenChoose"></darenChoose>
		<scroll-view v-if="!darenChoose" @touchstart="refreshStart" @touchmove="refreshMove" @touchend="refreshEnd"
			v-for="(listItem, listIndex) in list" :key="listIndex" @scroll="isScroll" style="height: 100vh;"
			scroll-y="true" @scrolltolower="lower1" scroll-with-animation :scroll-into-view="toView">
			<!-- #ifdef MP-TOUTIAO -->
			<view style="height: 30rpx;"></view>
			<!-- #endif -->
			<view :id="'top' + listIndex" class="marginBox" style="height: 94rpx;">边距盒子</view>
			<view class="statu-space" :style="{ height: statusBarHeight + 'px' }"></view>
			<view class="firstPage" v-if="listIndex == 0 && !darenChoose">
				<bannerSwiper></bannerSwiper>
				<!-- #ifdef MP-KUAISHOU -->
				<historyList v-if="historyList.length > 1" :historyList="historyList"></historyList>
				<view v-if="historyList.length === 0" style="height: 20rpx;width: 100vw;"></view>
				<view v-if="sectionList.length > 0" v-for="(sectionItem, sectionIndex) in sectionList">
					<relatedList :title="sectionItem.name" :list="sectionItem.contents"
						v-if="sectionItem.styleType == 'STYLE_3'" ref="relatedList"></relatedList>
					<hotSwiper v-if="sectionItem.styleType == 'STYLE_4'" :title="sectionItem.name"
						:list="sectionItem.contents" ref="hotSwiper"></hotSwiper>
					<hotBox v-if="sectionItem.styleType == 'STYLE_5'" :isLast="sectionList.length - 1 == sectionIndex"
						:title="sectionItem.name" :list="sectionItem.contents" :noMore="[1]" :listIndex="0"
						:hasLoad="[true]">
					</hotBox>
				</view>
				<!-- #endif -->
				<!-- #ifdef MP-TOUTIAO -->
				<historyListTT v-if="historyList.length > 1" :historyList="historyList"></historyListTT>
				<!-- 加群 -->
				<view v-if="groupId" style="position: relative;">
					<image style="height: 170rpx;width: 710rpx;margin-bottom: 20rpx;"
						src="https://res.qiguoread.com/staticResources/fellow_townsman/image/jiaqun_home1.png" lazy-load
						mode="aspectFill"></image>
					<button class="content-btn" open-type="joinGroup" :data-is-half-page="true" :group-id="groupId"
						@click="handleJoinGroup"></button>
				</view>
				<view v-if="sectionList.length > 0" v-for="(sectionItem, sectionIndex) in sectionList"
					:key="sectionIndex">
					<mayFollow :title="sectionItem.name" :list="sectionItem.contents"
						v-if="sectionItem.styleType == 'STYLE_1'" ref="mayFollow"></mayFollow>
					<oneLikeTT :subscribeIdObj="subscribeIdObj" v-if="sectionItem.styleType == 'STYLE_2'"
						:title="sectionItem.name" :list="sectionItem.contents" ref="oneLikeTT"></oneLikeTT>

					<ttStyleThree :subscribeIdObj="subscribeIdObj" v-if="sectionItem.styleType == 'STYLE_18'"
						:title="sectionItem.name" :list="sectionItem.contents" />
					<ttStyleFour :subscribeIdObj="subscribeIdObj" v-if="sectionItem.styleType == 'STYLE_19'"
						:title="sectionItem.name" :list="sectionItem.contents" />
				</view>
				<!-- #endif -->
			</view>
			<!-- #ifdef MP-TOUTIAO -->
			<!-- 分销无限流 -->
			<hotBoxTT @loadMore="lower1" v-if="listItem.length > 0" :listItem="listItem" :noMore="noMore"
				:listIndex="listIndex" :hasLoad="hasLoad"></hotBoxTT>
			<view style="height: 10rpx;"></view>
			<!-- #endif -->
			<lastWatch :nowItem="historyList[0]" v-if="isFirstLoad && ((!darenChoose && historyList.length === 1))">
			</lastWatch>
		</scroll-view>
		<!-- #ifdef MP-KUAISHOU -->
		<!-- 追剧弹窗 -->
		<zwyPopupAll :showClose="true" :maskCanClose="true" ref="zwyPopupAll">
			<view class="content-view flex flex-direction align-center" v-if="swiperList.length">
				<text class="title-set margin-top-lg text-xl text-bold text-black">{{ recommendObj.name }}</text>
				<text class="mark-box margin-top-xs text-sm text-gray">{{ nowVideoObj.contentInfo.title }}</text>
				<!-- 轮播-begin -->
				<view class="tower-swiper" @touchmove="TowerMove" @touchstart="TowerStart" @touchend="TowerEnd">
					<view class="tower-item" :class="item.zIndex == 1 ? 'none' : ''" v-for="(item, index) in swiperList"
						:key="index" :style="{ '--index': item.zIndex, '--left': item.mLeft }"
						:data-direction="direction" @tap="handleJumpDetail(item)">
						<view class="swiper-item">
							<image :src="item.contentInfo.coverImgUrl" lazy-load mode="aspectFill"></image>
						</view>
					</view>
				</view>
				<button class="btn-set" @tap="handleViewVideo">去追剧</button>
			</view>
		</zwyPopupAll>
		<!-- 关注快手服务号 -->
		<view v-if="showFollow" class="follow-bottom">
			<follow-services @follow='tapFollow'></follow-services>
		</view>
		<!-- #endif -->
		<dingyueBtn></dingyueBtn>
		<!-- #ifdef MP-TOUTIAO -->
		<!-- :left-right-padding="padding" -->
		<view v-if="dyInterestShow"
			style="position: fixed; bottom: 240rpx; left: 20rpx;right: 15rpx;z-index: 9999;display: flex;justify-content: center;">
			<image @click="closeDyInterest"
				style="width: 30rpx;height: 30rpx;position: absolute;top: -34rpx;right: 0rpx;"
				src="https://res.qiguoread.com/staticResources/fellow_townsman/image/close_btn_active.png" lazy-load
				mode="aspectFill"></image>
			<aweme-user-card :aweme-id="awemeId" :width="width" :height="height" @bindError="onerror"
				:fixed="fixed"></aweme-user-card>
		</view>
		<!-- v-show="insertAdTt"  -->
		<insertAdTt ref="insertAdTt" />
		<!-- <insertAdTt v-show="insertAdTt" ref="insertAdTt" /> -->
		<!-- #endif -->

		<!-- 首页广告解锁弹窗展示 -->
		<zwyPopupAll :showClose="false" :maskCanClose="true" ref="adViewBeforePop">
			<view class="ad-box-view">
				<image class="text-img"
					src="https://res.qiguoread.com/staticResources/fellow_townsman/image/uni/toutiao/index_ad_text.png"
					mode="widthFix"></image>
				<view class="content-box">
					<image class="cover-img" :src="adMessObj.coverImgUrl"></image>
					<view class="ad-btn" @click="handleViewAd">看广告解锁全集</view>
				</view>
				<image @tap="handleCloseBtn" class="ad-close-btn"
					src="https://res.qiguoread.com/staticResources/fellow_townsman/image/close_btn_active.png"
					mode="widthFix"></image>
			</view>
		</zwyPopupAll>
		<!-- #ifdef MP-TOUTIAO -->
		<view v-if="dyInterestShow"
			style="position: fixed; bottom: 240rpx; left: 20rpx;right: 15rpx;z-index: 9999;display: flex;justify-content: center;">
			<image @click="closeDyInterest"
				style="width: 30rpx;height: 30rpx;position: absolute;top: -34rpx;right: 0rpx;"
				src="https://res.qiguoread.com/staticResources/fellow_townsman/image/close_btn_active.png" lazy-load
				mode="aspectFill"></image>
			<aweme-user-card :aweme-id="awemeId" :width="width" :height="height" @bindError="onerror"
				:fixed="fixed"></aweme-user-card>
		</view>
		<!-- <insertAdTt v-show="insertAdTt" ref="insertAdTt" /> -->
		<!-- 追剧弹窗 -->
		<rewardAdTt @closeAdBox="handleClose" @closeAdBoxAndUnlock="closeAdBoxAndUnlock" :isIaaAd="true"
			ref="rewardAdTtIaa" />
		<!-- #endif -->
		<!-- #ifdef MP-KUAISHOU -->
		<rewardAd ref="rewardAdKsIaa" nowAdTypeKs="iaaAd" @closeAdBox="handleClose"
			@closeAdBoxAndUnlock="closeAdBoxAndUnlock"></rewardAd>
		<!-- #endif -->


		<zwyPopupAll :showClose="false" :maskCanClose="false" ref="chatPopup">
			<chatTTpopup :dyDiverInfo="dyDiverInfo" @isBack="isChatClose"></chatTTpopup>
		</zwyPopupAll>


	</view>
</template>

<script>
	const util = require('../../util/util.js');
	import chatTTpopup from './components/chatTTpopup.vue';
	import dingyueBtn from './components/dingyueBtn.vue';
	import historyList from './components/historyList.vue';
	import historyListTT from './components/historyListTT.vue';
	import refresh from '../../components/refresh.vue';
	import navTab from '../../components/navTab.vue';
	import loadMore from '../../components/loadMore.vue';
	import bannerSwiper from './components/bannerSwiper.vue';
	import darenChoose from './components/darenChoose.vue';
	import relatedList from './components/relatedList.vue';
	import hotSwiper from './components/hotSwiper.vue';
	import mayFollow from './components/mayFollow.vue';
	import lastWatch from './components/lastWatch.vue';
	import oneLikeTT from './components/oneLikeTT.vue';
	import hotBox from './components/hotBox.vue';
	import hotBoxTT from './components/hotBoxTT.vue';
	import ttStyleThree from './components/ttStyleThree.vue';
	import ttStyleFour from './components/ttStyleFour.vue';
	import followServices from '../video/components/followServices.vue';
	import insertAdTt from '../video/components/insertAdTt.vue';
	import rewardAdTt from '../video/components/rewardAdTt.vue';
	// #ifdef MP-KUAISHOU
	import rewardAd from '../video/components/rewardAd.vue';
	// #endif
	export default {
		components: {
			chatTTpopup,
			insertAdTt,
			dingyueBtn,
			historyListTT,
			historyList,
			refresh,
			navTab,
			loadMore,
			lastWatch,
			darenChoose,
			bannerSwiper,
			relatedList,
			hotSwiper,
			mayFollow,
			oneLikeTT,
			hotBox,
			hotBoxTT,
			ttStyleThree,
			ttStyleFour,
			followServices,
			rewardAdTt
			// #ifdef MP-KUAISHOU
			,
			rewardAd
			// #endif
		},
		data() {
			return {
				dyDiverInfo: '',
				isFirstLoad: true,
				clientName: this.clientName,
				subscribeIdObj: {},
				sectionList: [],
				historyList: [],
				darenChoose: false,
				bannerList: [],
				sceneCheck: false,
				topIndex: 0,
				statusBarHeight: uni.getSystemInfoSync()['statusBarHeight'] || 20, // 顶部高度状态栏
				toView: '', //回到顶部id
				tabTitle: [], //导航栏格式 --导航栏组件
				currentTab: 0, //sweiper所在页
				pages: [], //第几个swiper的第几页
				list: [], //数据格式
				noMore: [],
				hasLoad: [],
				isTop: true,
				nowVideoObj: {},
				recommendObj: {},
				intervalObj: null,
				swiperList: [], // 推荐弹窗的列表
				showFollow: false, //快手服务号弹窗
				isJumpAlready: false, // 合作挂链是否已经跳过播放页
				dyInterestShow: false,
				width: 650,
				height: 110,
				// padding: 32,
				fixed: true,
				awemeId: '',
				openId: '',
				continueWatchData: false, //继续观看
				groupId: null, //群id
				adMessObj: {}, // IAA广告参数
				viewAdStatus: false, // 是否是首页拉起的广告标识
				insertAdTt: false
			};
		},
		async onLoad(e) {
			//#ifdef MP-TOUTIAO
			tt.getSystemInfo({
				success(res) {
					console.log(res, 'getSystemInfo');
				},
				fail(res) {
					console.log(`getSystemInfo 调用失败`);
				},
			});
			//#endif


			//#ifdef MP-KUAISHOU
			this.updateAppManager()
			uni.showTabBarRedDot({
				index: 0
			})
			//#endif

			if (e.continueWatch) {
				this.continueWatchData = true;
			}
			this.isJumpAlready = false
			uni.setStorageSync('pathObj---3', e)
			let pathObj = e
			if (pathObj && pathObj.cid && pathObj.orgId && pathObj.customEx && pathObj.customUni) {
				getApp().globalData.isBusinessChain = true
				this.getAppLinkBatch(pathObj)
			}
			if (e.page == 'recharge') {
				uni.navigateTo({
					url: `/pages/recharge/recharge?id=${e.id}&batchId=${e.batchId}`
				})
			}
			this.$uma && this.$uma.trackEvent('Ume_ex_PV', {
				name: 'Umk_page1'
			});
			this.getIndexConfig()

			if (e && e.batchId && !e.page) {
				setTimeout(() => {
					this.getBatchInfoMess(e.batchId, e)
				}, 300)
			}
			//判断是否广告来源
			let adPath = JSON.parse(JSON.stringify(e))
			if (e && e.callback || (adPath.ad_params && JSON.parse(adPath.ad_params) && JSON.parse(adPath.ad_params)
					.log_extra && JSON.parse(adPath.ad_params).log_extra.clickid)) {
				getApp().globalData.callBack = true
			}
			// #ifdef MP-KUAISHOU
			this.getFollow()
			// #endif
		},
		onShareTimeline() {
			return {
				title: ''
			};
		},
		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage: function() {
			var shareJson = {
				path: '/pages/fx_xjc/fx_xjc',
				data: {
					sharePosition: '/pages/fx_xjc/fx_xjc',
					from: '/position/share/share',
					sharePage: '/pages/fx_xjc/fx_xjc'
				}
			};
			// 达人分享批次
			console.log(getApp().globalData.shareBatchId)
			if (getApp().globalData.shareBatchId) {
				shareJson.channel = 'video'
				shareJson.extra = {
					hashtag_list: ['精彩短剧热播中👈']
				}
			}
			shareJson.title = '精彩短剧热播中👈';
			return this.formatShare(shareJson);
		},

		async onShow(options) {
			console.log('options------', options)
			// this.cleanWatchWord();
			// console.log('this.$store.state.subscribeIdObj = subscribeIdObj',this.$store.state.subscribeIdObj);
			this.subscribeIdObj = this.$store.state.subscribeIdObj;
			if (getApp().globalData.videoShow) {
				this.$uma && this.$uma.trackEvent('Ume_page2_control', {
					name: 'Ume_page2_control_f1_And'
				});
			}
			let tempE = getApp().globalData.pathOptions;
			let e = JSON.parse(JSON.stringify(tempE));
			getApp().globalData.pathOptions = '';
			console.log('onShow', e);
			if (e && e.batchId) {

				getApp().globalData.batchEnter = true;
				getApp().globalData.batchId = e.batchId;
				uni.setStorageSync('bufferBatchId', e.batchId)
				await this.getBatchInfo(e.batchId);
			} else {
				getApp().globalData.batchEnter = false;
				getApp().globalData.batchInfo = '';
			}
			this.$statis({
				action: 'VISIT'
			})
			if (e) {
				for (let key in e) {
					uni.setStorageSync(key, e[key]);
				}
			}
			uni.$on('tapFollow', () => {
				uni.$off('update')
				this.showFollow = false
			})
			let enterJson = uni.getStorageSync('enterPath')
			let pathObj = enterJson && JSON.parse(enterJson)
			console.log('121212-----', pathObj)
			let isKs = false
			//#ifdef MP-KUAISHOU
			isKs = true
			//#endif
			//#ifdef MP-TOUTIAO
			isKs = false
			//#endif
			uni.setStorageSync('nowDate', new Date())
			if (pathObj && pathObj.query && pathObj.query.sourceFrom === 'APP_ANDROID' && pathObj.query.batchId &&
				isKs) { // app带批次进来默认是达人挂链设置场景符合
				getApp().globalData.sceneCheck = true
				getApp().globalData.shareBatchId = pathObj.query.batchId
				this.afterFunc(pathObj.query)
			} else if (pathObj && pathObj.query && pathObj.query.cid && pathObj.query.orgId && pathObj.query
				.customEx && pathObj.query.customUni && isKs && !this.isJumpAlready) {
				this.isJumpAlready = true
			} else { // 正常用户来源进来的判定是否是达人
				this.zwyRequest({
						url: '/cdp/spread_channel/batch/generate',
						method: 'POST',
						data: {}
					})
					.then(res => {
						console.log('getShareBatchId', res);
						//#ifdef MP-KUAISHOU
						if (res && res.batchId && (getApp().globalData.sceneCheck || getApp().globalData
								.needDarenChoose)) {
							getApp().globalData.shareBatchId = res.batchId;
						}
						//#endif
						//#ifdef MP-TOUTIAO
						if (res && res.batchId) {
							getApp().globalData.shareBatchId = res.batchId;
						}
						//#endif
						this.afterFunc(e);
					})
					.catch(res => {
						this.afterFunc(e);
					});
			}

			this.getHistory();
			//#ifdef MP-TOUTIAO
			await this.$nextTick()
			this.getDyDiversion(3, 1)
			this.getGroupInfo(3, 2)
			await this.$nextTick()
			console.log('this.$refs.insertAdTt', this.$refs.insertAdTt)
			const currentTimestamp = Math.floor(Date.now() / 1000);
			if (currentTimestamp - getApp().globalData.lastAdTimestamp > 180 && !getApp().globalData.isAdComeCheck) {
				// 曝光插屏广告
				// #ifdef MP-TOUTIAO
				console.log('Show interstitial ad');
				this.$refs.insertAdTt && this.$refs.insertAdTt.isShowAd()
				// getApp().globalData.lastAdTimestamp = currentTimestamp;
				console.log(this.$refs.insertAdTt, 'this.$refs.insertAdTt-------');
				// #endif
			} else {
				console.log('Skip interstitial ad');
			}
			//#endif
			// 检查是否存在IAA广告数据
			this.checkIsHasMessAd();

			// #ifdef MP-TOUTIAO
			this.getDyDiversionDaoliu(7, 2);
			// #endif
		},
		onUnload() {
			// this.setWatchWord();
			clearInterval(this.intervalObj)
		},
		onHide() {
			this.dyInterestShow = false
			// this.setWatchWord();
		},
		methods: {
			async getDyDiversionDaoliu(num, diversionTarget) {
				// 第一个参数是导流场景：1支付前，2支付后，3首页，4播放页按钮，第二个参数是导流目标，1是加关，2是加群
				// if (getApp().globalData.dyDiverInfo7) {
				// 	this.dyDiverInfo = getApp().globalData.dyDiverInfo7;
				// 	if (getApp().globalData.videoBack) {
				// 		this.$refs.chatPopup.show('mid');
				// 		getApp().globalData.videoBack = false;
				// 	}
				// 	return;
				// }
				if(!getApp().globalData.videoBack){
					return;
				}
				let res = await this.zwyRequest({
					method: 'get',
					url: `/douYin/diversion?diversionScene=${num}&diversionTarget=${diversionTarget}`
				})
				console.log('getDyDiversion', res);
				if (res && res[0]) {
					getApp().globalData.dyDiverInfo7 = res[0];
					this.dyDiverInfo = res[0];
					if (getApp().globalData.videoBack) {
						this.$refs.chatPopup.show('mid');
						getApp().globalData.videoBack = false;
						this.$statis({
							action: 'EXPOSURE',
							position: 'DY_DIVERSION_DY_GROUP/DY_HOME_POPUP',
							taskId:this.dyDiverInfo.id
						})
					}
				}
			},
			isChatClose() {
				this.$refs.chatPopup.close('mid');
			},
			handleJoinGroup(e) {
				//#ifdef MP-TOUTIAO
				setTimeout(() => {
					this.getGroupInfo(3, 2)
				}, 100)
				this.$statis({
					action: 'CLICK',
					position: 'DY_DIVERSION_DY_GROUP/DY_DIVERSION_HOME_PAGE',
					taskId:this.taskId
				})
				//#endif
				console.log(e, this.groupId, '回调信息')

			},
			async getGroupInfo(num, diversionTarget) {
				let res = await this.zwyRequest({
					method: 'get',
					url: `/douYin/diversion?diversionScene=${num}&diversionTarget=${diversionTarget}`
				})
				if (res && res[0]) {
					this.taskId = res[0].id;
					this.groupId = res[0].groupId
					this.$statis({
						action: 'EXPOSURE',
						position: 'DY_DIVERSION_DY_GROUP/DY_DIVERSION_HOME_PAGE',
						taskId:this.taskId
					})
				}
			},
			onerror(e) {

				console.log(e, '报错信息------报错信息------报错信息------');
			},
			closeDyInterest() {
				this.dyInterestShow = false
			},
			async getDyDiversion(num, diversionTarget) {
				let res = await this.zwyRequest({
					method: 'get',
					url: `/douYin/diversion?diversionScene=${num}&diversionTarget=${diversionTarget}`
				})
				if (res && res[0]) {
					this.awemeId = res[0].douYinUserId
					this.openId = res[0].openId
					let statusFollow = await this.getFollowCheckStatus()
					console.log(statusFollow, '关注状态---关注状态---关注状态');
					if (statusFollow.hasFollowed) {
						this.dyInterestShow = false
						await this.getEmpowerStatus(this.awemeId)
					} else {
						this.dyInterestShow = true
						this.$statis({
							action: 'EXPOSURE',
							position: 'DY_DIVERSION_DY_USER/DY_DIVERSION_HOME_PAGE',
						})
						setTimeout(() => {
							this.dyInterestShow = false
						}, 5000)
					}
				}
			},
			async getEmpowerStatus(dyUserId) {
				let res = await this.zwyRequest({
					method: 'get',
					url: `/douYin/diversion/record_auth?dyUserId=${dyUserId}`
				})
				let _this = this
				console.log(res, 'res.needAuth-----res.needAuth-----res.needAuth');
				if (res && res.needAuth) {
					tt.authorizePrivateMessage({
						imOpenId: this.openId,
						success: function(res) {
							console.log("success---私信---私信---私信", res)

							_this.postEmpowerStatus(dyUserId)
						},
						fail: function(res) {
							console.log("fail---私信---私信---私信", res)
						},
						complete(res) {
							console.log("complete---私信---私信---私信", res)
						}
					})
				}
			},

			async postEmpowerStatus(dyUserId) {
				let res = await this.zwyRequest({
					method: 'post',
					url: `/douYin/diversion/record_auth?dyUserId=${dyUserId}`
				})
				this.$statis({
					action: 'AUTH',
					position: 'DY_DIVERSION_DY_USER/DY_DIVERSION_HOME_PAGE',
				})
				console.log(res, '上报状态');
			},
			// 获取抖音关注
			getFollowCheckStatus() {
				console.log('app===========', tt.checkFollowAwemeState)
				return new Promise((resolve, reject) => {
					tt.checkFollowAwemeState({
						awemeId: this.awemeId,
						success: (res) => {
							console.log('app===========', res)
							if (res && res.hasFollowed) {
								resolve({
									hasFollowed: true
								})
							} else {
								resolve({
									hasFollowed: false
								})
							}
						},
						fail: (error) => {
							console.log('app===========1212', error)
							resolve({
								hasFollowed: false
							})
						}
					})
				})
			},
			async getOrganizationInfo(batchId) {
				let res = await this.zwyRequest({
					method: 'get',
					url: `/cdp/launch/organization_info?batchId=${batchId}`
				})
				if (res && res.organizationType) {
					if (['CPS_BUSINESS_DISTRIBUTOR'].includes(res.organizationType)) {
						getApp().globalData.isViewOrganization = false
					} else {
						getApp().globalData.isViewOrganization = true
					}

				} else {
					getApp().globalData.isViewOrganization = true
				}
				console.log('122112----', res)
			},
			// 合作商APP跳转进来处理
			async getAppLinkBatch(pathObj) {
				try {
					let {
						cid,
						orgId,
						customEx,
						customUni
					} = pathObj
					let platFrom = ''
					//#ifdef MP-KUAISHOU
					platFrom = 2
					//#endif
					//#ifdef MP-TOUTIAO
					platFrom = 1
					//#endif
					getApp().globalData.isViewOrganization = false
					this.zwyRequest({
						url: `/cdp/spread_batch/business/generate?compilationsId=${cid}&talentPromotePlatform=${platFrom}&organizationId=${orgId}&customExpert=${customEx}&customUniqueIdentification=${customUni}`,
						method: 'GET'
					}).then(res => {
						//#ifdef MP-KUAISHOU
						if (res && res.batchId) {
							console.log('isViewOrganization-----res.batchId', res.batchId)
							getApp().globalData.sceneCheck = true
							getApp().globalData.shareBatchId = res.batchId
							getApp().globalData.batchId = res.batchId
							this.afterFunc(pathObj)
							this.getBatchInfoMess(res.batchId, pathObj)
						}
						//#endif
						//#ifdef MP-TOUTIAO
						if (res && res.batchId) {
							getApp().globalData.batchId = res.batchId
							this.getOrganizationInfo(res.batchId)
							// console.log(12212112)
							// this.getMemberConfig(res.batchId)
							// getApp().getMemberTt(this)
							this.afterFunc(pathObj)
							this.getBatchInfoMess(res.batchId, pathObj)
						}
						//#endif
					})
				} catch (error) {
					console.log(error)
				}
			},
			/**
			 * 获取充值配置
			 * 存储大会员配置状态
			 */
			async getMemberConfig() {
				try {
					let time = Math.random()
					let res = await this.zwyRequest({
						method: 'get',
						url: `/wealth/api/pay_setting/global_vip_open?number=${time}`
					})
					if (res) {
						let status = res.data
						getApp().globalData.isConfigSsVip = status || false
					}
				} catch (error) {
					console.log(error)
				}
			},
			//获取是否关注服务号
			getFollow() {
				this.zwyRequest({
					method: 'get',
					url: `/cdp/user_subscribe/official_account?officialAccountAppId=${getApp().globalData.followedId}`
				}).then(res => {
					if (!res.subscribe) {
						this.$statis({
							action: 'SHOW_NOTICE_FRAME'
						})
						this.showFollow = true
					}
				})
			},
			tapFollow(e) {
				this.showFollow = false
			},
			// 去追剧
			handleViewVideo() {
				let itemObj = this.swiperList.find(item => item.mLeft === 0)
				console.log('itemObj', itemObj)
				itemObj && this.handleJumpDetail(itemObj)
			},
			handleJumpDetail(item) {
				console.log('item ===', item)
				this.direction = ''
				if (!item.fakeId && !item.contentInfo.fakeId) return
				this.$refs.zwyPopupAll && this.$refs.zwyPopupAll.close()
				this.zwyRouter(
					`../video/video?fakeId=${item.fakeId || (item.contentInfo || {}).fakeId}&compilationId=${item.compilationId || (item.contentInfo || {}).compilationId}`
					);
			},
			// 初始化towerSwiper
			TowerSwiper(name) {
				let list = this[name];
				for (let i = 0; i < list.length; i++) {
					list[i].zIndex = parseInt(list.length / 2) + 1 - Math.abs(i - parseInt(list.length / 2))
					list[i].mLeft = i - parseInt(list.length / 2)
				}
				this.swiperList = list
				this.nowVideoObj = this.swiperList.find(item => item.mLeft === 0)
			},
			// towerSwiper触摸开始
			TowerStart(e) {
				e.preventDefault()
				this.towerStart = e.touches[0].pageX
			},
			// towerSwiper计算方向
			TowerMove(e) {
				this.direction = e.touches[0].pageX - this.towerStart > 0 ? 'right' : 'left'
			},
			// towerSwiper计算滚动
			TowerEnd() {
				let direction = this.direction;
				let list = this.swiperList;
				if (direction == 'right') {
					let mLeft = list[0].mLeft;
					let zIndex = list[0].zIndex;
					for (let i = 1; i < this.swiperList.length; i++) {
						this.swiperList[i - 1].mLeft = this.swiperList[i].mLeft
						this.swiperList[i - 1].zIndex = this.swiperList[i].zIndex
					}
					this.swiperList[list.length - 1].mLeft = mLeft;
					this.swiperList[list.length - 1].zIndex = zIndex;
				} else {

					let mLeft = list[list.length - 1].mLeft;
					let zIndex = list[list.length - 1].zIndex;
					for (let i = this.swiperList.length - 1; i > 0; i--) {
						this.swiperList[i].mLeft = this.swiperList[i - 1].mLeft
						this.swiperList[i].zIndex = this.swiperList[i - 1].zIndex
					}
					this.swiperList[0].mLeft = mLeft;
					this.swiperList[0].zIndex = zIndex;
				}
				this.direction = ""

				this.nowVideoObj = this.swiperList.find(item => item.mLeft === 0)
				// console.log(this.nowVideoObj)
				this.swiperList = this.swiperList
			},
			addInterVal() {
				clearInterval(this.intervalObj)
				this.intervalObj = setInterval(() => {
					this.direction = 'left'
					this.TowerEnd()
				}, 3000)
			},
			// 获取首页配置
			async getIndexConfig() {
				try {
					let res = await this.zwyRequest({
						url: '/cdp/section_group',
						method: 'GET',
						data: {
							sectionGroupTypeValue: 3
						}
					})
					this.recommendObj = (res.find(item => item.styleType === 'STYLE_15') || {})
					this.swiperList = this.recommendObj.contents ? this.recommendObj.contents.slice(0, 3) : []
					// 初始化轮播配置
					this.TowerSwiper('swiperList')

					// 本地存储防止2次弹起
					let status = this.$store.state.viewPopupIndex

					console.log('status', status)
					if (!status && this.swiperList.length) {
						setTimeout(() => {
							this.$refs.zwyPopupAll.show('mid')
							this.addInterVal()
							this.$store.state.viewPopupIndex = true
						}, 100)
					}

					this.$forceUpdate();
				} catch (error) {
					console.log(error)
				}
			},
			getSection() {
				this.zwyRequest({
					url: '/cdp/section_group',
					method: 'GET',
					data: {}
				}).then(res => {
					let _this = this
					_this.sectionList = res;
					_this.$forceUpdate();
					console.log('section_group', res);
				})
			},
			getHistory() {
				this.zwyRequest({
					url: `/cdp/user_history/compilations?pageNum=1&pageSize=10`
				}).then(res => {
					console.log(`
					getHistory:${res},
					isFirstLoad:${this.isFirstLoad}
				`)
					if (this.isFirstLoad) {
						setTimeout(() => {
							this.isFirstLoad = false;
						}, 5000);
					}
					if (res) {
						this.historyList = res;
						// 继续观看 
						if (this.continueWatchData) {
							this.continueWatchData = false;
							// 跳转播放页
							let nowItem = this.historyList[0];
							this.zwyRouter(
								`/pages/video/video?fakeId=${nowItem.fakeId}&&compilationId=${nowItem.compilationId}`
								)
						}
						this.$forceUpdate();
					}
				});
			},
			afterFunc(e) {
				if (e && e.page) {
					let tempUrl = this.getUrl(e);
					console.log('tempUrl', tempUrl);
					setTimeout(() => {
						this.zwyRouter(tempUrl);
					}, 266);
				} else {
					if (this.tabTitle.length === 0 || getApp().globalData.needRefresh) this.initList();
				}
			},

			async getBatchInfo(batchId) {
				await this.zwyRequest({
					url: `/cdp/user/expert/${batchId}`
				}).then(res => {
					console.log('getBatchInfo', res);
					if (res) {
						getApp().globalData.batchInfo = res;
					}
				});
			},
			getUrl(e) {
				let tempUrl = `/pages/${e.page}/${e.page}`;
				for (let key in e) {
					if (tempUrl.indexOf('?') != -1) {
						tempUrl += `&${key}=${e[key]}`;
					} else {
						tempUrl += `?${key}=${e[key]}`;
					}
				}
				console.log('tempUrl', tempUrl);
				return tempUrl;
			},
			isScroll(e) {
				if (e.detail.scrollTop <= 40) this.isTop = true;
				else this.isTop = false;
			},
			async initList() {
				console.log('initList', getApp().globalData.sceneCheck);
				let res = await this.zwyRequest({
					url: '/cdp/index/compilations/classifies'
				});
				if (res) {
					// res.splice(1,1);
					this.tabTitle = [res[0]];
					// this.tabTitle = res;
					let tempObj = {
						pages: 1,
						list: [],
						noMore: 0
					};
					for (let key in tempObj) {
						this[key] = JSON.parse(JSON.stringify(new Array(this.tabTitle.length).fill(tempObj[key])));
					}
					this.getList();
				}
			},
			getList: util.throttle(function(type = 'refresh') {
				//#ifdef MP-KUAISHOU
				if ((getApp().globalData.shareBatchId && getApp().globalData.sceneCheck) || getApp().globalData
					.needDarenChoose) {
					this.darenChoose = true;
					getApp().globalData.darenChoose = true;
					return;
				}
				//#endif
				//#ifdef MP-TOUTIAO
				if (getApp().globalData.shareBatchId || getApp().globalData.needDarenChoose) {
					this.darenChoose = true;
					getApp().globalData.darenChoose = true;
					return;
				}
				//#endif
				this.getSection();
				this.darenChoose = false;
				getApp().globalData.darenChoose = false;
				if (this.tabTitle.length === 0) {
					this.initList();
					return;
				}
				let tempIndex = this.currentTab;
				let tempPageNum = this.pages[tempIndex];
				if (type == 'refresh') {
					this.$refs.refresh && this.$refs.refresh.rightEnd(); //直接刷新
					tempPageNum = 1;
					this.noMore[tempIndex] = 0;
					this.hasLoad[tempIndex] = false;
				}
				if (this.noMore[tempIndex] != 0) {
					return;
				}
				this.noMore[tempIndex] = 2;
				this.noMore = JSON.parse(JSON.stringify(this.noMore));
				let tempUrl = tempIndex == 0 ? '/cdp/index/compilations/carefully_choose' :
					'/cdp/index/compilations/classify';
				let postData;
				if (tempIndex == 0) {
					postData = {
						clientPageNum: tempPageNum
					};
					if (this.serverOverPageNum != -1 && tempPageNum != 1) postData['serverOverPageNum'] = this
						.serverOverPageNum;
				} else {
					postData = {
						homeClassifyId: this.tabTitle[tempIndex]['id'],
						pageNum: tempPageNum
					};
				}
				this.zwyRequest({
					url: tempUrl,
					data: postData
				}).then(res => {
					console.log('getList', res);
					let tempList = this.list;
					if (tempIndex == 0 && res && res.compilationsList) {
						if (type == 'refresh') {
							this.serverOverPageNum = res.serverOverPageNum;
						}
						res = res.compilationsList || [];
					} else res = res;

					res = res && res.map(item => {
						if (item.popularityNum > 10000) item.popularityNum = (item.popularityNum /
							10000).toFixed(2) + '万';
						item['isVip'] = false;
						if (this.checkJujiVip(item.efficientLocks)) item['isVip'] = true;
						return item;
					});
					if (type == 'refresh') {
						tempList[tempIndex] = res;
						tempPageNum = 2;
					} else {
						tempList[tempIndex] = tempList[tempIndex].concat(res);
						tempPageNum++;
					}
					this.noMore[tempIndex] = res.length < 8 ? 1 : 0;
					this.pages[tempIndex] = tempPageNum;
					this.hasLoad[tempIndex] = true;
					this.hasLoad = JSON.parse(JSON.stringify(this.hasLoad));
					this.list = JSON.parse(JSON.stringify(tempList));
					this.noMore = JSON.parse(JSON.stringify(this.noMore));
					this.$refs.refresh.endAfter(); //刷新结束调用
					getApp().globalData.needRefresh = false;
					this.$forceUpdate();
				});
			}, 300),
			toDetail(item, type) {
				if (type == 'mayLike') {
					this.$uma && this.$uma.trackEvent('Ume_skip', {
						name: 'Ume_skip_page1_like'
					});
				} else if (type == 'hot') {
					this.$uma && this.$uma.trackEvent('Ume_skip', {
						name: 'Ume_skip_page1_hot'
					});
				}
				console.log('item', item);
				this.zwyRouter(`../video/video?fakeId=${item.fakeId}&compilationId=${item.compilationId}`);
			},
			initData() {
				let tempObj = {
					pages: 1,
					list: [],
					noMore: 0,
					allList: [],
					hasLoad: false
				};
				for (let key in tempObj) {
					this[key] = new Array(this.tabTitle.length).fill(tempObj[key]);
				}
			},
			// 加载更多 util.throttle为防抖函数
			lower1: util.throttle(function(e) {
				console.log('loadmore');
				this.getList('loadMore');
			}, 360),
			// 刷新touch监听
			refreshStart(e) {
				this.$refs.refresh.refreshStart(e);
			},
			refreshMove(e) {
				this.$refs.refresh.refreshMove(e);
			},
			refreshEnd(e) {
				this.$refs.refresh.refreshEnd(e);
			},
			isRefresh() {
				if (this.$refs.relatedList && this.$refs.relatedList[0]) {
					console.log('this.$refs.relatedList', this.$refs.relatedList);
					this.$refs.relatedList[0].getRelatedList();
				}
				this.getList('refresh');
			},
			// 获取批次信息重定向到播放页
			async getBatchInfoMess(batchId, e) {
				try {
					let res = await this.zwyRequest({
						method: 'get',
						url: '/cdp/launch/getMediaSpreadInfo',
						data: {
							batchId: batchId
						}
					})

					if (res && res.mediaAccountSpreadBatchDTO && res.mediaAccountSpreadBatchDTO.batchId) {
						this.dyInterestShow = false
						setTimeout(() => {
							let objMess = res.mediaAccountSpreadBatchDTO
							// 首页中转埋点计数
							this.$uma && this.$uma.trackEvent('Ume_PageView', {
								name: 'Ume_PageView_Into_Video'
							});
							let keyLink = ''
							if (e) {
								Object.keys(e).forEach(key => {
									if (key != 'batchId') {
										keyLink += `&${key}=${e[key]}`
									}
								})
							}
							console.log('keyLink------', keyLink)
							getApp().globalData.spreadMode = objMess.spreadMode || ''
							getApp().globalData.seqEpisodeListSwitch = objMess.seqEpisodeListSwitch || false
							getApp().globalData.payAmountCloseSwitch = objMess.payAmountCloseSwitch || false
							getApp().globalData.spreadModeBatch = objMess.spreadMode || ''
							uni.setStorageSync('adMess', JSON.stringify({
								...e,
								keepDate: new Date()
							}))
							uni.setStorageSync('adMessLinkKey', keyLink)
							uni.setStorageSync('adMessLinkKeyAll',
								`/pages/video/video?fakeId=${res.fakeId}&batchId=${objMess.batchId}${keyLink}`
								)
							//  #ifdef MP-KUAISHOU
							this.zwyRouter(
								`/pages/video/video?fakeId=${res.fakeId}&batchId=${objMess.batchId}&compilationId=${objMess.compilationsId || ''}&enterSequence=${objMess.enterSequence || 0}&userLockSequenc=${objMess.stickingPointSequence || ''}&userLockId=${objMess.kuaiShouSevAccount || ''}&buySpace=${objMess.buySpace || ''}`
								)
							// #endif
							// #ifdef MP-TOUTIAO
							this.zwyRouter(
								`/pages/video/video?fakeId=${res.fakeId}&batchId=${objMess.batchId}`)
							// #endif

						}, 600)
					}
				} catch (error) {
					console.log(error)
				}
			},
			// 检查是否有广告解锁
			checkIsHasMessAd() {
				console.log('触发11212121212')
				let adMess = uni.getStorageSync('indexAdViewMess')
				let {
					coverImgUrl,
					lockId,
					tempUrl
				} = adMess || {}
				// 展示首页弹窗
				if (coverImgUrl && lockId && tempUrl) {
					this.adMessObj = adMess
					this.$refs.adViewBeforePop && this.$refs.adViewBeforePop.show('mid')
				} else {
					this.$refs.adViewBeforePop && this.$refs.adViewBeforePop.close()
				}
			},
			handleCloseBtn() {
				this.$refs.adViewBeforePop && this.$refs.adViewBeforePop.close()
				this.viewAdStatus = false
			},
			handleClose() {
				this.viewAdStatus = false
			},
			async handleViewAd() {
				let res = await this.getAdLockStatus()
				let hasNum = res.exposeAd // 是否还有次数
				if (!hasNum) {
					uni.showToast({
						title: '广告看的太多了,过会儿再来吧！',
						icon: 'none'
					})
					return
				}
				this.$statis({
					action: 'EXPOSURE',
					position: '/position/iaa/window'
				})
				this.viewAdStatus = true
				// #ifdef MP-TOUTIAO
				this.$refs.rewardAdTtIaa && this.$refs.rewardAdTtIaa.isShowAd()
				// #endif
				//  #ifdef MP-KUAISHOU
				this.$refs.rewardAdKsIaa && this.$refs.rewardAdKsIaa.isShowAd()
				// #endif
			},
			// 检查广告是否还能曝光，次数上限制
			async getAdLockStatus() {
				try {
					let res = await this.zwyRequest({
						method: 'get',
						url: `/attribute_server_api/ad/unlock/limit/check`
					})
					return res
				} catch (error) {}
			},
			// 广告观看完毕解锁
			closeAdBoxAndUnlock() {
				console.log('viewAdStatus', this.viewAdStatus)
				if (!this.viewAdStatus) return
				this.$refs.adViewBeforePop && this.$refs.adViewBeforePop.close()
				// #ifdef MP-TOUTIAO
				let config = uni.getStorageSync('ttConfigMess')
				this.$statisAd({
					action: 'COMPLETE',
					adId: config.adLockId,
					adSlot: 2,
				})
				// #endif
				// 字节广告组件全局的 播放页的看完也会触发这里，这里加了标识判断下
				if (this.isIaaAd) {
					let count = (uni.getStorageSync('adLockCount') || {}).count || 0
					count++
					uni.setStorageSync('adLockCount', {
						count: count,
						date: new Date()
					})
				}
				console.log('viewAdStatus', this.viewAdStatus)
				this.adHasFinish()
			},
			adHasFinish() {
				let {
					fakeId,
					lockId,
					tempUrl,
					ticket
				} = this.adMessObj
				this.zwyRequest({
					url: tempUrl,
					data: {
						lockId: lockId,
						ticket: ticket
					},
					header: {
						'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'
					},
					method: 'post'
				}).then(res => {
					console.log('indexAdViewMess-----', res)
					uni.removeStorageSync('indexAdViewMess')
					this.zwyRouter(`/pages/video/video?fakeId=${fakeId}&iaaUnLockStr=${ticket}`)
				}).finally(() => {
					this.viewAdStatus = false
				})
			}
		}
	};
</script>

<style scoped lang="scss">
	.content-btn {
		position: absolute;
		width: 100%;
		bottom: 26rpx;
		left: 50%;
		transform: translateX(-50%);
		height: 170rpx;
		width: 710rpx;
		opacity: 0;
		// width: 240rpx;
		// height: 57rpx;
		// background: url('https://res.qiguoread.com/staticResources/fellow_townsman/image/jiaqun_home_btn.png');
		// background-size: 100% 100%;
	}

	::-webkit-scrollbar {
		width: 0;
		height: 0;
		color: transparent;
	}

	.isDesBox {
		width: 100vw;
		line-height: 70rpx;
		padding-right: 24rpx;
		height: 70rpx;
		padding-left: 24rpx;
		color: #333333;
		font-size: 28rpx;
		font-size: 28rpx;
		background: #f7f7f7;
	}

	.firstPage {
		display: flex;
		align-items: center;
		flex-direction: column;
		width: 100%;
	}

	.clamp {
		display: -webkit-box;
		word-break: break-all;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.isTitle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 22rpx;
		width: 96vw;
		font-size: 32rpx;
		font-weight: bold;
		color: #333333;
		margin-top: 18rpx;
	}

	.rankLine {
		width: 90vw;
		margin: auto;
		padding: 20rpx;
		transition: 0.3s;
		color: #333;
		border-bottom: 1px solid #f2f3f4;
	}

	.lineImgBox {
		width: 100%;
		margin-top: 20rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.lineImg0 {
		border-top-left-radius: 20rpx;
		border-bottom-left-radius: 20rpx;
	}

	.lineImg2 {
		border-top-right-radius: 20rpx;
		border-bottom-right-radius: 20rpx;
	}

	.lineImg0,
	.lineImg1,
	.lineImg2 {
		overflow: hidden;
		width: 32%;
		height: 200rpx;
	}

	.bottomHover {
		opacity: 0.8;
	}

	.topHover {
		opacity: 0.5;
	}

	.marginBox {
		width: 100%;
		opacity: 0;
	}

	.navTopChoose {
		font-size: 34rpx !important;
		font-weight: bold;
		color: black !important;
	}

	.navTopItem {
		transition: 0.3s;
		font-size: 30rpx;
		padding: 0 20rpx;
		color: #909499;
	}

	.navTopBox {
		font-size: 34rpx;
		font-weight: bold;
		// border-bottom: 1px solid #f2f3f4;
		width: 92vw;
		line-height: 104rpx;
		display: flex;
		align-items: center;
		height: 104rpx;
		// #ifdef MP-KUAISHOU
		margin: auto;
		justify-content: center;
		//  #endif
		// #ifdef MP-TOUTIAO
		margin: 0 0 0 100rpx;
		//  #endif
	}

	.loadMore {
		background-color: #ffffff;
		padding: 0 23rpx;
		position: relative;
		z-index: 11;
	}

	.loadMoreBox::before {
		content: '';
		position: absolute;
		top: 0;
		bottom: 0;
		left: 0;
		right: 0;
		width: 90vw;
		height: 2rpx;
		background-color: #d9d9d9;
		margin: auto;
	}

	.loadMoreBox {
		position: relative;
		height: 100rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100vw;
		font-size: 22rpx;
		color: #c3c3c3;
	}

	.rankItem {
		width: 20vw;
		text-align: center;
		font-size: 22rpx;
	}

	.lineHover {
		background-color: #f2f3f4 !important;
	}

	.container999 {
		width: 100vw;
		font-size: 28rpx;
		min-height: 100vh;
		overflow: hidden;
		color: #6b8082;
		position: relative;
		background-color: #ffffff;
		/* #ifdef MP-TOUTIAO */
		background-color: #F5F5F5;
		/* #endif */
	}

	.content {
		display: flex;
		flex-wrap: wrap;
		width: 100vw;
		padding: 0 3%;
		box-sizing: border-box;
		justify-content: space-between;
	}

	.card {
		width: 90%;
		height: 368rpx;
		background-color: white;
		margin: 0 auto 42rpx auto;
		background: #ffffff;
		box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);
		border-radius: 5px;
		position: relative;
	}

	.noCard {
		width: 90vw;
		height: 200rpx;
		margin: auto;
		background-color: white;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #999999;
	}

	.nav {
		position: fixed;
		left: 0;
		top: 0;
		color: #000000;
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
		font-size: 24rpx;
		background-color: #ffffff;
		z-index: 996;
	}


	.content-view {
		background: #fff;
		width: 550rpx;
		border-radius: 33rpx;

		.btn-set {
			width: 386rpx;
			height: 80rpx;
			display: flex;
			// align-items: center;
			justify-content: center;
			line-height: 80rpx;
			color: #fff;
			font-size: 32rpx;
			border-radius: 80rpx;
			margin: 21rpx 0 45rpx;
			background: #F66E8E;
			border: none;
		}

		.mark-box-set {
			width: 360rpx;
		}

		.img-box-one {
			width: 121rpx;
			height: 121rpx;
		}

		.img-box-two {
			width: 386rpx;
		}
	}

	.tower-swiper .tower-item {
		transform: scale(calc(0.5 + var(--index) / 10));
		margin-left: calc(var(--left) * 100upx - 150upx);
		z-index: var(--index);
	}

	.tower-item.none {
		opacity: 0.6 !important;
	}

	.tower-swiper .tower-item .swiper-item {
		border-radius: 13rpx;
		overflow: hidden;
		display: flex;
		justify-content: center;

		image {
			width: 345rpx;
			width: 242rpx;
			border-radius: 13rpx;
		}
	}

	.tower-swiper {
		width: 100%;
		height: 345rpx;
	}

	.follow-bottom {
		position: fixed;
		bottom: 20rpx;
		left: 30rpx;
		z-index: 1;
		width: calc(100% - 60rpx);
	}

	.ad-box-view {
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 530rpx;

		.text-img {
			width: 100%;
			display: table-cell;
		}

		.content-box {
			margin-top: 40rpx;
			background: #ffffff;
			width: 530rpx;
			border-radius: 20rpx;
			padding: 34rpx 27rpx;
		}

		.cover-img {
			display: table-cell;
			width: 476rpx;
			height: 635rpx;
			border-radius: 20rpx;
		}

		.ad-btn {
			margin-top: 32rpx;
			width: 476rpx;
			height: 88rpx;
			background: linear-gradient(90deg, #FF6525 0%, #FF2A01 100%);
			border-radius: 44rpx;
			color: #fff;
			text-align: center;
			line-height: 88rpx;
		}

		.ad-close-btn {
			margin-top: 40rpx;
			height: 42rpx;
			width: 42rpx;
		}
	}
</style>